package Impl;

import Bean.BeanCourse;
import Dao.CourseDao;
import Service.CourseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;

@Service("CourseServiceImpl")
public class CourseServiceImpl implements CourseService {
    @Resource(name="CourseDAO")
    CourseDao courseDao;

    @Override
    public ArrayList<BeanCourse> getCourses() throws Exception {
        return courseDao.getCourses();
    }

    @Override
    public ArrayList<BeanCourse> getCoursesByClass(int id) throws Exception {
        return courseDao.getCoursesByClass(id);
    }


}
